Update Android SDK tools and bundled binaries#5279
Open
jardondiego wants to merge 1 commit into
Open
Conversation
This change: - Replaces the deprecated sdk-tools-linux with modern commandlinetools-linux. - Updates the local installation script to handle the new cmdline-tools directory structure. - Bumps the default Android emulator API level to 34 (x86_64). - Updates the bundled adb and fastboot binaries to version 37.0.0. These updates fix 'java.lang.NoClassDefFoundError' issues on modern systems and prevent ADB version mismatches between ClusterFuzz and local emulators.
letitz
approved these changes
May 19, 2026
Collaborator
letitz
left a comment
There was a problem hiding this comment.
LGTM % one optional suggestion, and one question around bitness that needs to be resolved before landing.
Comment on lines
+40
to
+47
| unzip -d $ANDROID_SDK_INSTALL_DIR $ANDROID_SDK_INSTALL_DIR/cmdline-tools.zip | ||
|
|
||
| # The new cmdline-tools expects to be in a directory named 'latest' or 'version' | ||
| # to find its own root. | ||
| mv $ANDROID_SDK_INSTALL_DIR/cmdline-tools $ANDROID_SDK_INSTALL_DIR/temp | ||
| mkdir -p $ANDROID_SDK_INSTALL_DIR/cmdline-tools/latest | ||
| mv $ANDROID_SDK_INSTALL_DIR/temp/* $ANDROID_SDK_INSTALL_DIR/cmdline-tools/latest/ | ||
| rm -rf $ANDROID_SDK_INSTALL_DIR/temp |
Collaborator
There was a problem hiding this comment.
If the archive only contains cmdline-tools at the root, then consider unzipping directly to a temp directory instead of unzipping to the target dir, then moving to a temp directory.
Suggested change
| unzip -d $ANDROID_SDK_INSTALL_DIR $ANDROID_SDK_INSTALL_DIR/cmdline-tools.zip | |
| # The new cmdline-tools expects to be in a directory named 'latest' or 'version' | |
| # to find its own root. | |
| mv $ANDROID_SDK_INSTALL_DIR/cmdline-tools $ANDROID_SDK_INSTALL_DIR/temp | |
| mkdir -p $ANDROID_SDK_INSTALL_DIR/cmdline-tools/latest | |
| mv $ANDROID_SDK_INSTALL_DIR/temp/* $ANDROID_SDK_INSTALL_DIR/cmdline-tools/latest/ | |
| rm -rf $ANDROID_SDK_INSTALL_DIR/temp | |
| unzip -d $ANDROID_SDK_INSTALL_DIR/temp $ANDROID_SDK_INSTALL_DIR/cmdline-tools.zip | |
| # The new cmdline-tools expects to be in a directory named 'latest' or 'version' | |
| # to find its own root. | |
| mv $ANDROID_SDK_INSTALL_DIR/{temp/cmdline-tools,cmdline-tools/latest} | |
| rmdir $ANDROID_SDK_INSTALL_DIR/temp |
| $ANDROID_TOOLS_BIN/sdkmanager --licenses | ||
| $ANDROID_TOOLS_BIN/avdmanager create avd --force -n TestImage -k "system-images;android-$ANDROID_VERSION;google_apis;x86" | ||
| $ANDROID_TOOLS_BIN/sdkmanager "platform-tools" "platforms;android-$ANDROID_VERSION" "build-tools;$ANDROID_VERSION.0.0" | ||
| $ANDROID_TOOLS_BIN/sdkmanager "system-images;android-$ANDROID_VERSION;google_apis;x86_64" |
Collaborator
There was a problem hiding this comment.
Are we switching from 32 bits to 64 here?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates the Android toolchain to modern versions to fix compatibility issues and improve stability.
Changes:
sdk-tools-linuxwith moderncommandlinetools-linux(Revision 11076708) inlocal/install_python_deps_linux.bash.cmdline-toolsdirectory structure.adbandfastbootbinaries to version 37.0.0.Impact:
java.lang.NoClassDefFoundErroron systems using Java 11+.